export const parseFav = function (status) {
  switch (status) {
    case 0:
      return { label: '已收藏', type: 'success', actionTip: '收藏成功', action: 'do', result: 1 }
    case 1:
      return { label: '未收藏', type: 'danger', actionTip: '已取消收藏', action: 'cancel', result: 0 }
  }
}

export const parseAvatar = function (type) {
  switch (type) {
    case 'member':
      return this.list.profile.avatar
    // case 'dms': return require('../../assets/img/head-portrait.png')
    case 'teacher':
      return this.list.avatar
  }
}

export const parseName = function (type) {
  switch (type) {
    case 'member':
      return this.list.profile.truename
    case 'dms':
      return this.list.truename
    case 'teacher':
      return this.list.name
  }
}
